/**
* File: gui.h
*
* \brief Graphical User Interface for agent management.
*
* \author Instituto Superior Tecnico de Lisboa, Portugal
* \author Technical University of Lisbon, Portugal
* 
* \author Agentes Autonomos e Sistemas Multiagente
* \author Autonomous Agents and Multiagent Systems
* 
* \version	1.0
* \date		2006/2007
**/
#pragma once

#include "../engine.h"

namespace game{ namespace gui{
	//=============================================================================
	// Constants and Defines
	//=============================================================================
	/**  VGUI menu **/
#define MENU_TEAM             2
#define MENU_TERRORIST        26
#define MENU_CT               27

	//=============================================================================
	// Enumerations
	//=============================================================================
	/** 
	* \brief Chat message types.
	**/
	class ChatType{
	public:
		enum Enumeration{
			all,
			terrorist,
			counterTerrorist,
			dead,
			unknown
		};
	};

	//=============================================================================
	// Structures
	//=============================================================================
	/** 
	* \brief Struct for menus.
	**/
	typedef struct MenuText_s
	{
		int         ValidSlots;   // Ored together Bits for valid Keys
		const char *szMenuText;   // Ptr to actual String
	} MenuText;

	/** 
	* \brief Array to hold agent creation parameters.
	**/
	typedef struct AgentCreationRecord_s
	{
		bool     bNeedsCreation;
		edict_t *pCallingEnt;
		char     name[22];
		char     team[3];
		char     model[3];
		char     mind[64];
	} AgentCreationRecord;

	//=============================================================================
	// Global variables
	//=============================================================================
	extern MenuText menuMain;
	extern MenuText menuSelectTeam;
	extern MenuText menuSelectMind;
	extern MenuText menuWaypointMenu;
	extern MenuText menuWaypointMenu2;
	extern MenuText menuWaypointRadius;
	extern MenuText menuWaypointAdd;
	extern MenuText menuWaypointFlag;

	/** 
	* \brief Agent creation information.
	**/
	extern AgentCreationRecord g_agentCreationTabs[32];

	//=============================================================================
	// Function prototypes
	//=============================================================================
	void addAgent(const char *team = NULL, const char *name = NULL, 
		const char *mind = NULL, const char *model = NULL);
	void fillServer(int iSelection, int iPersonality);
	void removeAllAgents(void);
	void killAllAgents(void);
	void kickRandomAgent(void);
	void newroundAll();

	void createAgent(edict_t *pPlayer, 
		const char *teamArg, const char *nameArg, const char *mindArg, const char *classArg);

	void client_CS_VGUI(void *p, int bot_index);
	void client_CS_ShowMenu(void *p, int bot_index);
	void client_CS_WeaponList(void *p, int bot_index);
	void client_CS_CurrentWeapon(void *p, int bot_index);
	void client_CS_AmmoX(void *p, int bot_index);
	void client_CS_AmmoPickup(void *p, int bot_index);
	void client_CS_Damage(void *p, int bot_index);
	void client_CS_Money(void *p, int bot_index);
	void client_CS_StatusIcon(void *p, int bot_index);
	void client_CS_DeathMsg(void *p, int bot_index);
	void client_CS_ScreenFade(void *p, int bot_index);
	void client_CS_HLTV(void *p, int bot_index);
	void client_CS_TextMsgAll(void *p, int bot_index);
	void client_CS_TextMsg(void *p, int bot_index);
	void client_CS_SayText(void *p, int bot_index);
}}